package fx.componet;

import fx.protocol.Anchor;
import fx.protocol.ChildrenAddAble;
import javafx.scene.Node;
import javafx.scene.layout.HBox;

import java.util.List;

public class MyHbox extends HBox implements Anchor, ChildrenAddAble<Node> {

    @Override
    public ChildrenAddAble<Node> addEle(Node node) {
        childrenEle().add(node);
        return this;
    }

    @Override
    public List<Node> childrenEle() {
        return getChildren();
    }

    @Override
    public Node anchorEle() {
        return this;
    }
}
